﻿<phone:PhoneApplicationPage 
    x:Class="BitcoinMarket.AppSettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:BitcoinMarket"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikToggleSwitch="clr-namespace:Telerik.Windows.Controls.ToggleSwitch;assembly=Telerik.Windows.Controls.Primitives"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">

    <controls:Pivot Style="{StaticResource PivotStyle1}" Margin="0, 0, 0, 0" Background="White" Foreground="#FFF7931A" Title="{Binding Path=LocalizedResources.AppTitleCapital, Source={StaticResource LocalizedStrings}}">
        <!--Pivot item one-->
        <controls:PivotItem Header="{Binding Path=LocalizedResources.NetworkChartsSettingsTitle, Source={StaticResource LocalizedStrings}}">
            <!--ContentPanel - place additional content here-->
           
                <Grid x:Name="ContentGrid" Margin="0, -20, -10, 0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="121*" />
                    <ColumnDefinition Width="345*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Row="0" HorizontalAlignment="Left" Foreground="#FF4D4D4D" Text="{Binding Path=LocalizedResources.SettingsFeaturedChartsDescription, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" UseLayoutRounding="True" Margin="0,0,10,15" Width="Auto" Grid.ColumnSpan="2" />

                    <ListBox Grid.Row="1" Style="{StaticResource ListBoxStyle1}" Margin="0,-10,0,0" ItemsSource="{Binding NetworkStatusChartItems}" Grid.ColumnSpan="2" Grid.RowSpan="2">
                        <!--Bind the contents of the Items collection in our viewmodel -->
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>

                                        <telerikPrimitives:RadToggleSwitch Grid.Row="0" Margin="0,0,0,10" VerticalAlignment="Top"
                        Header="{Binding ChartTitle}" IsChecked="{Binding ChartEnabled, Mode=TwoWay}" Width="460">
                                            <telerikPrimitives:RadToggleSwitch.ButtonStyle>
                                                <Style TargetType="telerikToggleSwitch:ToggleSwitchButton">
                                                    <Setter Property="CheckBackground" Value="#FFF7931A"/>
                                                    <Setter Property="BorderBrush" Value="#FF4D4D4D"/>
                                                    <Setter Property="Background" Value="White"/>
                                                    <Setter Property="ThumbBackground" Value="#FF4D4D4D"/>

                                                </Style>
                                            </telerikPrimitives:RadToggleSwitch.ButtonStyle>
                                            <telerikPrimitives:RadToggleSwitch.HeaderStyle>
                                                <Style TargetType="ContentControl">
                                                    <Setter Property="Foreground" Value="#FF4D4D4D"/>
                                                    <Setter Property="FontWeight" Value="Bold"/>
                                                    <Setter Property="HorizontalAlignment" Value="Left"/>
                                                    <Setter Property="FontSize" Value="22"/>
                                                </Style>
                                            </telerikPrimitives:RadToggleSwitch.HeaderStyle>
                                            <telerikPrimitives:RadToggleSwitch.ContentTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text="{Binding}" Foreground="#FFF7931A" />
                                                </DataTemplate>
                                            </telerikPrimitives:RadToggleSwitch.ContentTemplate>
                                        </telerikPrimitives:RadToggleSwitch>

                                        <TextBlock Grid.Row="1" HorizontalAlignment="Left" FontSize="17" Foreground="#A44D4D4D" Text="{Binding ChartDescription}" TextWrapping="Wrap" UseLayoutRounding="True" Margin="0,-5,0,10" Width="Auto" />
                                    </Grid>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
           
        </controls:PivotItem>

        <controls:PivotItem Header="{Binding Path=LocalizedResources.CurrenciesSettingsTitle, Source={StaticResource LocalizedStrings}}">
            <!--ContentPanel - place additional content here-->
           
                <Grid x:Name="ContentGrid2" Margin="0, -20, -10, 0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Row="0" HorizontalAlignment="Left" Foreground="#FF4D4D4D" Text="{Binding Path=LocalizedResources.SettingsCurrenciesDescription, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" UseLayoutRounding="True" Margin="0,0,10,15" Width="Auto" />

                <ProgressBar Grid.Row="1" Visibility="Collapsed" IsIndeterminate="true" x:Name="CurrenciesProgressBar" Style="{StaticResource CustomIndeterminateProgressBar}" Foreground="#F7931A" />
                    
                <ListBox Style="{StaticResource ListBoxStyle1}" Margin="0,-10,0,0" Grid.Row="1" ItemsSource="{Binding CurrenciesItems}">
                        <!--Bind the contents of the Items collection in our viewmodel -->
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <telerikPrimitives:RadToggleSwitch Grid.Row="0" Margin="0,0,0,10" VerticalAlignment="Top"
                        Header="{Binding CurrencyTitle}" IsChecked="{Binding CurrencyTopped, Mode=TwoWay}" Width="460">
                                        <telerikPrimitives:RadToggleSwitch.ButtonStyle>
                                            <Style TargetType="telerikToggleSwitch:ToggleSwitchButton">
                                                <Setter Property="CheckBackground" Value="#FFF7931A"/>
                                                <Setter Property="BorderBrush" Value="#FF4D4D4D"/>
                                                <Setter Property="Background" Value="White"/>
                                                <Setter Property="ThumbBackground" Value="#FF4D4D4D"/>

                                            </Style>
                                        </telerikPrimitives:RadToggleSwitch.ButtonStyle>
                                        <telerikPrimitives:RadToggleSwitch.HeaderStyle>
                                            <Style TargetType="ContentControl">
                                                <Setter Property="Foreground" Value="#FF4D4D4D"/>
                                                <Setter Property="FontWeight" Value="Bold"/>
                                                <Setter Property="HorizontalAlignment" Value="Left"/>
                                                <Setter Property="FontSize" Value="22"/>
                                            </Style>
                                        </telerikPrimitives:RadToggleSwitch.HeaderStyle>
                                        <telerikPrimitives:RadToggleSwitch.ContentTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding}" Foreground="#FFF7931A" />
                                            </DataTemplate>
                                        </telerikPrimitives:RadToggleSwitch.ContentTemplate>
                                    </telerikPrimitives:RadToggleSwitch>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
           
        </controls:PivotItem>
    </controls:Pivot>
</phone:PhoneApplicationPage>
